package com.xhb.ui.tools;

import javax.swing.*;
import javax.xml.bind.DatatypeConverter;

public class UItools {
    public static void parseButton(JButton button) {
        button.setContentAreaFilled(false);
        button.setBorder(BorderFactory.createEmptyBorder());
        button.setBorderPainted(false);
        button.setFocusPainted(false);
    }

    public static ImageIcon base64ToImageIcon(String base64Str) {
        ImageIcon imageIcon = null;
        byte[] byteArray2 = DatatypeConverter.parseBase64Binary(base64Str);
        if (byteArray2.length > 0) {
            imageIcon = new ImageIcon(byteArray2);
        }
        return imageIcon;
    }

}
